<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>完成付款</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="__INDEX__/css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="__INDEX__/css/style.css" />
		<link rel="stylesheet" href="__INDEX__/css/iconfont.css" />
		<link rel="stylesheet" href="__INDEX__/css/mall.css" />
	</head>
	<style>
		.fukc_top>p{
			font-size: 1.5rem;
			font-weight: bolder;
		}

			/*绑定弹出框*/
		.mask{background: rgba(0,0,0,0.7); width: 100%; height: 100%; position: fixed; left: 0; top: 0; display: none;}
		.phone_box{width: 80%; background: white; margin: 9rem auto 0; border-radius: 3px; padding: 4% 5% 5%;}
		.phonetc_bt{color: #000000; font-weight: bold; font-size: 1rem; margin-bottom: .1rem;}
		.phone_box .wz{font-size: .85rem; line-height: normal; margin-bottom: 1.2rem; color: #666666;}
		.phone_box input{border-color: #811588; padding: 10px; color: #000000; font-size: .85rem;}
		.phone_btn{background: #38ab3c; border: 0; width: 100%; height: 2.5rem; color: white; font-size: 1.1rem; margin-top: .5rem;}
		.phone_box .yzm_input{width: 52%; float: left;}
		.yzm_btn{width: 45%; float: right; background: #CCCCCC; text-align: center; font-size: .85rem; height: 40px; line-height: 40px; border-radius: 5px; color: #000000;}
		.phone_box input{    line-height: 21px;
		    width: 100%;
		    height: 40px;
		    margin-bottom: 15px;
		    padding: 10px 15px;
		    -webkit-user-select: text;
		    border: 1px solid rgba(0,0,0,.2);
		    border-radius: 3px;
		    outline: 0;
		    background-color: #fff;
		    -webkit-appearance: none;
		}
	   
	</style>
<body style="background: #efeff4;">
	<div class="mui-content">
		<div class="fukc_top">
			<p style="margin-right: 3%; text-align: right; display: none;" id='gz'>
	    		<a style="font-size: 14px;color: #1AAD19;" href="https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzUxOTUwNzkyMA==&scene=124#wechat_redirect"> 
		    		<span class="mui-icon iconfont icon-shoucang" style="font-size: 1.3rem; line-height: 2rem;"></span>
					<span class="mui-tab-label">关注</span> 
	    		</a>
	    	</p>
			<div class="iconfont icon-weixin2" style="display: none;"></div>
			<div class="iconfont icon-zhifubao1" style="display: none;"></div>
			<p id='is_success'>支付成功</p>
			<div class="fukc_pribox">¥<em id='pay_money'></em></div>
		</div>
		<div class="fukc_djh clearfix">
			
			<div class="clearfix dixian" style="display: none;">
				<div class="left"><span class="shopinf_glj">鼓励金抵扣</span></div>
				<div class="right"><em id='j_pay_score'></em><em>元</em></div>
			</div>
		</div>
		<div class="fukc_xq clearfix">
			<div class="left">付款详情</div>
			<div class="right">
				<p class="clearfix is_jif">
					<Span class="pleft" id='pay_model'></Span>
					<span class="pright"><em id='pay_money2'></em>元</span>
				</p>
				<p class="clearfix">
					<Span class="pleft">订单编号</Span>
					<span class="pright"><em id='sn'></em></span>
				</p>
			</div>
		</div>
		<div class="qitsj_lisbox">
			<!--<a href="{:url('member/index')}">
				<div class="fukc_djh fukc_gljye clearfix">
					<div class="left"><span class="fuk_gljye">鼓励金余额</span></div>
					<div class="right"><em id='user_score'></em>元</div>
				</div>
			</a>-->
			<ul class="index_sjlist" id='item_ul'>
				<!--<li class="clearfix">
					<div class="tjsj_img"><img src="../images/bgtu.jpg"></div>
					<div class="tjsj_info">
						<div class="tjsj_nam">
							<div class="name">英豪大酒店</div>
							<div class="iconfont icon-new"></div>
						</div>
						<div class="tjsj_jif">鼓励金最高可抵<em>100%</em></div>
						<div class="tjsj_dzbox clearfix">
							<div class="tjsj_dz">北湖区，南岭大道辅路</div>
							<div class="tjsj_jul">3.295km</div>
						</div>
					</div>
				</li>-->
			</ul>
		</div>
	</div> 
	
</body>
{include file="public/footer" /}

<script src="__PUBLIC__/static/js/assist.js"></script>
<script type="text/javascript">
	
	//页面跳转
	$("#footer-list .mui-tab-item").click(function(){
		var href = this.href;
		window.location=href;
	})
var index = layer.load(0, {shade: false,time: 1.5 * 1000});
$(".layui-layer-loading").css("left", "50%");
get_data();
    function get_data(){

    		$.ajax({
				type: "post",
				data: {
					order_sn	: getUrlParam('order_sn')
				},
				url: "{:url('index/pay/pay_success')}",
				success: function(data) {
					//付款信息
					var pay_log_info = data.pay_info.pay_log_info;
					if(pay_log_info) {
						
						if(pay_log_info['state'] == 2){
							$('#is_success').text('付款成功');
						}else{
							$('#gz').hide();
							$('#is_success').text('付款成功');
						}
						//付款方式
						if(pay_log_info['pay_type'] == 2) {
							$('.icon-weixin2').show();
							$('#pay_model').text('微信支付');
						} else {
							$('.icon-zhifubao1').show();
							$('#pay_model').text('支付宝支付');
						}
						
						if(data.pay_info.user_core){
							//用户鼓励金余额
							$('#user_score').text(data.pay_info.user_core['score']);
							if(data.pay_info.user_core['is_atten'] == 0){
								$('#gz').show();
							}
							
						}else{
							$('#user_score').text(0);
						}
						
						if(data.pay_info.type == 1){
							$('#gz').hide();
						}else{
							$('.bt2').html('<img src="__PUBLIC__/static/index/images/sys.gif" style="margin-top: 20px;">');
						}
						//付款金额
						$('#pay_money').text(pay_log_info['origin_price']);
						$('#pay_money2').text(pay_log_info['balance']);
						//订单号
						$('#sn').text(pay_log_info['order_sn']);
						//赠送鼓励金
						$('#s_pay_score').text(pay_log_info['member_score']);
						//抵扣鼓励金
						$('#j_pay_score').text(pay_log_info['agent_score']);
						if(pay_log_info['agent_score'] > 0) {
							$('.dixian').show();
						}
					}
				}
			});
    }

</script>